#include <iostream>
using namespace std;

int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int T;
  for (cin >> T; T; T--) {
    int n, m, k;

    cin >> n >> m >> k;

    int ll = 1, rr = m;
    while (ll < rr) {
      int mm = (ll + rr) >> 1;
      int s = m / (mm + 1) * mm + m % (mm + 1);

      if ((long long)s * n >= k) {
        rr = mm;
      } else {
        ll = mm + 1;
      }
    }
    cout << ll << "\n";
  }
  return 0;
}